﻿namespace WYJ.SDK.Web
{
    public class Response<T>
    {
        public T? Content { get; set; }
        public bool OK { get; set; }
        public string? Message { get; set; }

        protected Response()
        {
        }

        public static Response<T> Fail(string reason = "操作失败")
        {
            return new Response<T> { Message = reason };
        }
        public static Response<T> Success(T? data, string message = "操作成功")
        {
            return new Response<T> { Content = data, Message = message, OK = true };
        }
    }
}